import java.util.Vector;

public class HeroTank extends Tank {
    Shot shot=null;
    Vector<Shot> Shots = new Vector<>();

    public HeroTank(int x, int y) {
        super(500, 500);
    }


    public void shoot(){
        switch (getDirect()){
            case 0:
                 shot = new Shot(getX() - 2, getY() - 30,0);
                break;
            case 1:
                 shot = new Shot(getX() + 30, getY() - 2,1);
                break;
            case 2:
                 shot = new Shot(getX() - 2, getY() + 30,2);
                break;
            case 3:
                 shot = new Shot(getX() - 30, getY() - 2,3);
                break;
        }
        Shots.add(shot);
        new Thread(shot).start();
    }
}
